package com.ytjj.qmyx.supplychain.common.model.request;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单详情报关参数
 */
@Data
@ToString
public class OrderItemAttachInfoRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 供应链商品id
     */
    @NotNull(message = "供应链商品id不能为空")
    @Min(value = 1, message = "供应链商品id必须大于0")
    private Integer supplyProductId;
    /**
     * 供应链商品规格id
     */
    @NotNull(message = "供应链商品规格id不能为空")
    @Min(value = 1, message = "供应链商品规格id必须大于0")
    private Integer supplyProductSpecId;
    /**
     * 销售端商品名称
     */
    @NotBlank(message = "商品名称不能为空")
    private String itemName;
    /**
     * 交易平台销售商品的描述信息
     */
    @NotBlank(message = "商品描述不能为空")
    private String itemDescribe;
    /**
     * 商品数量
     */
    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量必须大于0")
    private Integer qty;
    /**
     * 商品单价
     */
    @NotNull(message = "商品单价不能为空")
    @DecimalMin(value = "0.01", message = "商品单价必须大于0")
    private BigDecimal price;
    /**
     * 商品总价
     */
    @NotNull(message = "商品总价不能为空")
    @DecimalMin(value = "0.01", message = "商品总价必须大于0")
    private BigDecimal totalPrice;
    /**
     * 币制:限定为人民币，填写“142”
     */
    private String currency;
    /**
     * 备注
     */
    private String note;
    /**
     * 销售端商品链接
     */
    @NotBlank(message = "商品链接不能为空")
    private String itemLink;
}
